﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace EtityTest.Migrations
{
    /// <inheritdoc />
    public partial class Init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "BillFares",
                columns: table => new
                {
                    ID = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Cooker = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Price = table.Column<float>(type: "float", nullable: false),
                    Taste = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Cuisine = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Taboo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    VegDishes = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MetDishes = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BillFares", x => x.ID);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    ID = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    FirstName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Pay = table.Column<float>(type: "float", nullable: false),
                    Gender = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Age = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    DimissionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    HolidayTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    deltime = table.Column<DateTime>(type: "datetime(6)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.ID);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "BillFares",
                columns: new[] { "ID", "Cooker", "Cuisine", "MetDishes", "Price", "Taboo", "Taste", "VegDishes" },
                values: new object[] { new Guid("00000000-0000-0000-0000-000000000000"), "张三", "川菜", "红烧肉", 200f, "患有胃病人员", "麻辣", "青椒炒土豆丝" });

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "ID", "AddTime", "Age", "DimissionTime", "FirstName", "Gender", "HolidayTime", "LastName", "Pay", "Type", "deltime" },
                values: new object[] { new Guid("b8e731ff-51fa-4534-8f86-b4bef01d9f97"), new DateTime(2025, 5, 22, 10, 45, 21, 991, DateTimeKind.Local).AddTicks(1249), 30, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "张", true, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "三", 10000f, 0, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BillFares");

            migrationBuilder.DropTable(
                name: "Users");
        }
    }
}
